package com.example.ndkjnidemo.home.dynamicregist;

import android.content.Context;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.example.ndkjnidemo.databinding.ActivityDynamicRegistBinding;
import com.example.ndkjnidemo.home.staticregist.ExternClass;

/**
 *
 */
public class DynamicRegistActivity extends AppCompatActivity {

    private static final String TAG = "DynamicRegistActivity";
    private ActivityDynamicRegistBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivityDynamicRegistBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        //===
        Context context = getApplicationContext();
        JNIMethodDynamic jni_test = new JNIMethodDynamic(context);
        String text = jni_test.stringFromJNI();
        binding.sampleText.setText(text);

        ExternClass externClass = new ExternClass();
        String from = "from DynamicRegistActivity";
        jni_test.transmitToJNI(from, externClass);
    }
}